<template>
	<view class="box">
		<safearea></safearea>
		
		<!-- 设置和消息按钮 -->
		<view class="row set">
			<image src="/static/shezhi.png" class="setimg"></image>
			<image src="/static/xiaoxi.png" class="setimg"></image>
		</view>

		<!-- 头像和昵称 -->
		<view class="head">
			<image src="/static/logo.png" class="headimg" mode="aspectFill"></image>
			<view class="user-info">
				<view class="nicename">@不认识路的老林</view>
				<view class="levl">
					<text>lv.3</text>
					<text>女</text>
				</view>
			</view>
		</view>

		<!-- 用户信息 -->
		<view class="user-stats">
			<view class="stat line">
				<view class="stat-number">200</view>
				<view class="stat-label">参与</view>
			</view>
			<view class="stat line">
				<view class="stat-number">200</view>
				<view class="stat-label">收藏</view>
			</view>
			<view class="stat">
				<view class="stat-number">200</view>
				<view class="stat-label">设备</view>
			</view>
		</view>

		<!-- 等级与奖励积分 -->
		<view class="level-box">
			<view class="level-info">
				<image src="/static/dengji.png" class="level-icon"></image>
				<view class="bar">
					<view style="width:30%; background-color: #ff4d6a; border-radius: 20rpx;height: 20rpx"></view>
				</view>
				<view class="level">lv.3</view>
			</view>
			<view class="points">
				<view class="points-number">80000</view>
				<view class="points-label">奖励积分</view>
			</view>
		</view>

		<!-- 近七日统计 -->
		<view class="seven-days-stats">
			<view class="stat">
				<view class="stat-number">200</view>
				<view class="stat-label">近七日阅读</view>
			</view>
			<view class="stat">
				<view class="stat-number">200</view>
				<view class="stat-label">近七日提问</view>
			</view>
			<view class="stat">
				<view class="stat-number">200</view>
				<view class="stat-label">近七日互动</view>
			</view>
		</view>

		<!-- 服务与合作项 -->
		<view class="service-box">
			<view class="service-item">
				<image src="/static/renzheng2.png" class="service-icon"></image>
				<view>认证测评师</view>
			</view>
			<view class="service-item">
				<image src="/static/yijianfankui.png" class="service-icon"></image>
				<view>意见反馈</view>
			</view>
			<view class="service-item">
				<image src="/static/kefu.png" class="service-icon"></image>
				<view>客服服务</view>
			</view>
			<view class="service-item">
				<image src="/static/hezuo.png" class="service-icon"></image>
				<view>商务合作</view>
			</view>
			<view class="botten"></view>
		</view>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {}
		},
		methods: {}
	}
</script>

<style lang="scss">
	@import "@/common/style/base-style.scss";

	/* 主容器 */
	.box {
	    background: 
	        url('/static/my_bg.jpg') no-repeat top center,  /* 上半部分为背景图片 */
	        #f0f0f0; /* 下半部分为灰色背景 */
	    background-size: 100% 600rpx;  /* 图片占据宽度100% 和高度500rpx */
	    background-position: top center; /* 确保图片居中显示 */
	    height: 100vh; /* 总高度占满屏幕 */
	    padding: 30rpx;
	    /* 使背景分为上下两部分，图片和灰色 */
	}

	/* 每行的布局 */
	.row {
		display: flex;
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
		margin-bottom: 20rpx;
	}

	/* 设置和消息按钮 */
	.set {
		justify-content: flex-end;
		.setimg {
			width: 45rpx;
			height: 45rpx;
			margin-left: 20rpx;
		}
	}

	/* 头像和昵称 */
	.head {
		display: flex;
		align-items: center;
		margin-top: 40rpx;
		padding-left: 40rpx;
		.headimg {
			width: 100rpx;
			height: 100rpx;
			border-radius: 50%;
			border: 4px solid white;
		}
		.user-info {
			margin-left: 20rpx;
			.nicename {
				font-size: 18px;
				font-weight: bold;
				color: #fff;
			}
			.levl {
				display: flex;
				align-items: center;
				margin-left: 10rpx;
				> text {
					font-size: 14px;
					color: #fff;
					margin-right: 10rpx;
					margin-top:10rpx;
				}
			}
		}
	}

	/* 用户统计 */
	.user-stats {
		display: flex;
		justify-content: space-between;
		width: 100%;
		margin-top: 80rpx;
		.stat {
			display: flex;
			flex-direction: column;
			align-items: center;
			width: 33.3%;
			.stat-number {
				font-size: 38rpx;
				font-weight: bold;
				color: #fff;
				text-align: center;
			}
			.stat-label {
				font-size: 28rpx;
				color: #fff;
			}
		}
		.line{
			border-right: #fff solid 1px;
		}
	}

	/* 等级与奖励积分 */
	.level-box {
		background-color: $brand-bottern-t-color;
		width: 90%;
		height: 150px;
		border-radius: 15rpx;
		padding: 40rpx;
		align-items: center;
		margin-top: 60rpx;
		.bar{
			width: 70%;
			height: 20rpx;
			background-color: #fff;
			border-radius: 20px;
			border-color: #fff 1px solid;
		}
		.level-icon {
			width: 80rpx;
			height: 80rpx;
		}
		.level-info {
			flex-grow: 1;
			display: flex;
			justify-content: space-between;
			align-items: center;
		}
		.level {
			font-size: 36rpx;
			font-weight: bold;
			color: #fff;
		}
		.points {
			text-align: center;
			margin-top: 40rpx;
			.points-number {
				font-size: 80rpx;
				font-weight: bold;
				color: #fff;
			}
			.points-label {
				font-size: 36rpx;
				color: #fff;
			}
		}
	}

	/* 近七日统计 */
	.seven-days-stats {
		display: flex;
		justify-content: space-between;
		align-items: center; 
		margin-top: 60rpx;
		height: 300rpx;
		border-radius: 20rpx;
		background-color: #fff;
		.stat {
			display: flex;
			flex-direction: column;
			align-items: center;
			
			width: 33.3%;
			.stat-number {
				font-size: 40rpx;
				font-weight: bold;
				color: $brand-botten-color;
			}
			.stat-label {
				font-size: 28rpx;
				color: #000;
			}
		}
	}

	/* 服务与合作项 */
	.service-box {
		display: flex;
		justify-content: space-between;
		align-items: center; 
		margin-top: 30rpx;
		background-color: #fff;
		border-radius: 20rpx;
		height: 150px;
		.service-item {
			margin-bottom: 20rpx;
			width: 25%;
			display: flex;
			flex-direction: column;
			align-items: center;
			.service-icon {
				width: 80rpx;
				height: 80rpx;
				margin-right: 15rpx;
			}
			
			> view {
				font-size: 28rpx;
				margin-top: 5px;
				color: #000;
			}
		}
	}
	.botten{
		height: 30px;
	}
</style>